<?php
/*
# ------------------------------------------------------------------------
# JD Base Theme
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/
if (T3Util::isIE() && T3Util::isRTL()) { ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<?php } else { ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php } ?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $language->language; ?>" lang="<?php echo $language->language; ?>">
<head>
	<?php if (T3Util::getDevice ()=='iphone'):?>
	<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=5.0; user-scalable=1;" />
	<meta name="apple-touch-fullscreen" content="YES" />
	<?php endif;?>
	
	<?php if (T3Util::getDevice ()):?>
	<meta name="HandheldFriendly" content="true" />
	<?php endif;?>
	
	<?php print $head ?>
	<title><?php print $head_title ?></title>
	<?php print $styles ?>
	<?php print $scripts ?>
	<?php print $t3['scripts'] ?>
	<?php //Include stylesheet for this layout ?>
	
	<?php print $t3['styles'] ?>
	<?php print $t3['css'] ?>
	
	<?php if($t3_head) print $t3_head ?>
	<!--[if IE 7.0]>
	<style>
	.clearfix { display: inline-block; } /* IE7xhtml*/
	</style>
	<![endif]-->
</head>
<body id="bd" class="<?php print $body_class ?>">
<div id="ja-wrapper">
	<a name="Top" id="Top"></a>
	<?php if($t3_top) print $t3_top ?>
	
	<!-- MAIN CONTAINER -->
	<div id="ja-container" class="wrap <?php echo $colwidth['cls_w'] ? $colwidth['cls_w'] : 'ja-mf'; ?>">
		<?php print $t3['block-header'] ?>
		<div id="ja-mainbody" style="width:<?php echo $colwidth['mw'] ?>%">
			<!-- CONTENT -->
			<div id="ja-main" style="width:<?php echo $colwidth['m'] ?>%">
			<div class="inner clearfix">
				<?php if($t3['content-mass-top']) : ?>
				<div id="ja-content-mass-top" class="ja-mass ja-mass-top clearfix">
					<?php print $t3['content-mass-top']; ?>
				</div>
				<?php endif; ?>

				<div id="ja-contentwrap" class="clearfix <?php echo $colwidth['cls_m']; ?>">
					<div id="ja-content" class="column" style="width:<?php echo $colwidth['cw'] ?>%">
						<div id="ja-current-content" class="column" style="width:<?php echo $colwidth['c'] ?>%">
							<?php 
							//content-top
							if($t3['content-top']) : ?>
							<div id="ja-content-top" class="ja-content-top clearfix">
								<?php print $t3['content-top']; ?>
							</div>
							<?php endif; ?>
							
							<div id="ja-content-main" class="ja-content-main clearfix">
								<?php print $t3['message'] ?>
								<div class="node-wrapper clearfix">
								<?php print $t3['content'] ?>
								</div>
							</div>

							<?php 
							//content-bottom
							if($t3['content-bottom']) : 
							?>
							
							<div id="ja-content-bottom" class="ja-content-bottom clearfix">
								<?php print $t3['content-bottom']; ?>
							</div>
							<?php endif; ?>
						</div>

						<?php 
						//inset1
						if($t3['inset1']) : 
						?>
						<div id="ja-inset1"  class="ja-col column ja-inset1" style="width:<?php echo $colwidth['i1'] ?>%">
							<?php print $t3['inset1']; ?>
						</div>
						<?php endif; ?>
					</div>

					<?php 
					//inset2
					if($t3['inset2']) : 
					?>
					<div id="ja-inset2" class="ja-col column ja-inset2" style="width:<?php echo $colwidth['i2'] ?>%">
						<?php print $t3['inset2']; ?>
					</div>
					<?php endif; ?>
					
				</div>

				<?php 
				//content-mass-bottom
				if($t3['content-mass-bottom']) : 
				?>
				<div id="ja-content-mass-bottom" class="ja-mass ja-mass-bottom clearfix">
					<?php print $t3['content-mass-bottom']; ?>
				</div>
				<?php endif; ?>
			</div>
			</div>
			<!-- //CONTENT -->
			<?php if (($l = $colwidth['l'])): ?>
			<!-- LEFT COLUMN--> 
			<div id="ja-left" class="column sidebar" style="width:<?php echo $l ?>%">
				<?php 
				//left-mass-top
				if($t3['left-mass-top']) : 
				?>
				<div id="ja-left-mass-top" class="ja-mass ja-mass-top clearfix">
					<?php print $t3['left-mass-top']; ?>
				</div>
				<?php endif; ?>

				<?php
				$cls1 = $cls2 = "";
				
				if ($t3['left1'] && $t3['left2']) {
					$cls1 = "ja-left1";
					$cls2 = "ja-left2";
				}
				if ($t3['left1'] || $t3['left2']):
				?>
				<div class="ja-colswrap <?php echo $colwidth['cls_l']; ?> clearfix">
				<?php if ($t3['left1']):
				?>
					<div id="ja-left1"  class="ja-col <?php echo $cls1;?> column" style="width:<?php echo $colwidth['l1']?>%">
						<?php print $t3['left1']; ?>				
					</div>
				<?php endif ?>

				<?php if ($t3['left2']): 
				?>
					<div id="ja-left2" class="ja-col <?php echo $cls2;?> column" style="width:<?php echo $colwidth['l2']?>%">
						<?php print $t3['left2']; ?>				
					</div>
				<?php endif ?>
				</div>
				<?php endif ?>
				<?php 
				//left-mass-bottom
				if($t3['left-mass-bottom']) : 
				?>
				<div id="ja-left-mass-bottom" class="ja-mass ja-mass-bottom clearfix">
					<?php print $t3['left-mass-bottom']; ?>
				</div>
				<?php endif; ?>
			</div>
			<!-- //LEFT COLUMN--> 
			<?php endif; ?>
			
		</div>
		<?php if (($r = $colwidth['r'])): ?>
		<!-- RIGHT COLUMN--> 
		<div id="ja-right" class="column sidebar" style="width:<?php echo $r ?>%">

			<?php 
			//left-mass-top
			if($t3['right-mass-top']) : 
			?>
			<div id="ja-right-mass-top" class="ja-mass ja-mass-top clearfix">
				<?php print $t3['right-mass-top']; ?>
			</div>
			<?php endif; ?>

			<?php
			$cls1 = $cls2 = "";
			if ($t3['right1'] && $t3['right2']) {
				$cls1 = "ja-right1";
				$cls2 = "ja-right2";
			}
			
			if ($t3['right1'] || $t3['right2']): ?>
			<div class="ja-colswrap <?php echo $colwidth['cls_r']; ?> clearfix">
				<?php if ($t3['right1']):
				?>
				<div id="ja-right1" class="ja-col <?php echo $cls1;?> column" style="width:<?php echo $colwidth['r1']?>%">
					<?php print $t3['right1']; ?>				
				</div>
				<?php endif ?>

				<?php if ($t3['right2']): ?>
				<div id="ja-right2" class="ja-col <?php echo $cls2;?> column" style="width:<?php echo $colwidth['r2']?>%">
					<?php print $t3['right2']; ?>			
				</div>
				<?php endif ?>
			</div>
			<?php endif ?>
			<?php 
			//right-mass-bottom
			if($t3['right-mass-bottom']) : 
			?>
			<div id="ja-right-mass-bottom" class="ja-mass ja-mass-bottom clearfix">
				<?php print $t3['right-mass-bottom']; ?>
			</div>
			<?php endif; ?>
		</div>
		<!-- //RIGHT COLUMN--> 
		<?php endif; ?>
		<?php print $t3['block-footer'] ?>
	</div>
	<?php if($t3['fixheight']) print $t3['fixheight'] ?>
	<!-- //MAIN CONTAINER -->
	
	<?php if($t3_bottom) print $t3_bottom ?>
</div>

<?php print $closure ?>

</body>
</html>